<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<button v-for="tab in tabs" @click="curComp = tab.comp">
				{{tab.label}}
			</button>
			<component v-bind:is="curComp"></component>
		</div>
		
		<script>
			var app = Vue.createApp({
				data(){
					return {
						curComp:'comment-comp'
						tabs:[
							{
								comp:'intro-comp',label:'商品介绍组件'
							},
							{
								comp:'comment-comp',label:'商品评价组件'
							},
							{
								comp:'question-comp',label:'商品常见组件'
							}
						]	
					}
				}
			});
			app.component('intro-com',{
				template:'<div style="background-color:lightblue">商品介绍信息内容</div>'
			});
			app.component('intro-com',{
				template:'<div style="background-color:red">商品评价信息内容</div>'
			});
			app.component('intro-com',{
				template:'<div style="background-color:green">商品常见问答内容</div>'
			});
			var vm = app.mount("#app")	
		</script>
	</body>
</html>
